package com.dragon.concurrent.demo.book;

import java.lang.reflect.Proxy;
import java.sql.SQLException;

public class Test1 {

    public static void main(String[] args) throws SQLException {
        Class clazz = Test.class;
        A proxyConnection  = (A) Proxy.newProxyInstance(clazz.getClassLoader(),
                clazz.getInterfaces(), new Test.ConnectionHandler());
//        Statement statement = proxyConnection.createStatement();
        System.out.println("proxyConnection:" + proxyConnection);
    }
}
